package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by libin on 03/03/2017.
 */

@RestController
public class ApplicationController {

	@Autowired
	Environment env;
	
    @RequestMapping("/")
    public String getIndex(){
    	String p1 = env.getProperty("test.name");
    	String hn = System.getenv("HOSTNAME");
		return "BOOK Service in " + hn + " Available. has a pro:" + p1;
    }
}
